#!/usr/bin/env python3.5
# -*- coding: utf-8 -*-
# author wwqgtxx <wwqgtxx@gmail.com>

try:
    from ..common import *
except Exception as e:
    from common import *

__all__ = ["IQiYiParser", "IQiYiDashParser"]

import json
import time
import hashlib
import random
import urllib.parse

macid = None


def get_macid():
    '''获取macid,此值是通过mac地址经过算法变换而来,对同一设备不变'''
    global macid
    if macid is not None:
        return macid
    macid = ''
    chars = 'abcdefghijklnmopqrstuvwxyz0123456789'
    size = len(chars)
    for i in range(32):
        macid += list(chars)[random.randint(0, size - 1)]
    return macid


def md5(s):
    return hashlib.md5(s.encode('utf8')).hexdigest()


def md5x(url_params):
    # '''计算关键参数vf'''
    # sufix = ''
    # for j in range(8):
    #     for k in range(4):
    #         v4 = 13 * (66 * k + 27 * j) % 35
    #         if (v4 >= 10):
    #             v8 = v4 + 88
    #         else:
    #             v8 = v4 + 49
    #         sufix += chr(v8)
    # url_params += sufix
    # m = hashlib.md5()
    # m.update(url_params.encode('utf-8'))
    # vf = m.hexdigest()
    # return vf
    sufix = '1j2k2k3l3l4m4m5n5n6o6o7p7p8q8q9r'
    return md5(url_params + sufix)


async def getvps(tvid, vid):
    tm = int(time.time() * 1000)
    host = 'http://cache.video.qiyi.com'
    params = {
        'tvid': tvid,
        'vid': vid,
        'v': 0,
        'qypid': '{}_12'.format(tvid),
        'src': '01012001010000000000',
        't': tm,
        'k_tag': 1,
        'k_uid': get_macid(),
        'rs': 1,
    }
    src = '/vps?{}'.format(urllib.parse.urlencode(params))
    vf = md5x(src)
    req_url = '{}{}&vf={}'.format(host, src, vf)
    html = await get_url_service.get_url_async(req_url, allow_cache=False)
    return json.loads(html)


async def cmd5x(s):
    # async with js_engine.VM(r"""
    # function cmd5x(b){R=new ArrayBuffer(16*1024);pt=321*16;Rp=new Int32Array(R);Rq=new Uint8Array(R);a=new Int8Array(R);c=new Int32Array(R);Rp[0]=255;i=1760;m=0;n=0;o=0;p=0;s=0;t=0;u=0;v=0;w=0;x=0;y=0;z=0;A=0;B=0;C=0;D=0;E=0;F=0;G=0;H=0;I=0;J=0;K=0;L=Math.floor;M=Math.abs;Z=Math.imul;_=Math.min;ua=0;var ut=0;for(var ui=0;ui<b.length;++ui){var u=b.charCodeAt(ui);if(u>=55296&&u<=57343)u=65536+((u&1023)<<10)|b.charCodeAt(++ui)&1023;if(u<=127){++ut}else if(u<=2047){ut+=2}else if(u<=65535){ut+=3}else if(u<=2097151){ut+=4}else if(u<=67108863){ut+=5}else{ut+=6}}var ps=new Array(ut+1);var po=0,pn=0;Rp[51]=3920;Rp[54]=8328;var pm=pn+ut;for(var ui=0;ui<b.length;++ui){var u=b.charCodeAt(ui);if(u>=55296&&u<=57343)u=65536+((u&1023)<<10)|b.charCodeAt(++ui)&1023;if(u<=127){if(pn>=pm)break;ps[pn++]=u}else if(u<=2047){if(pn+1>=pm)break;ps[pn++]=192|u>>6;ps[pn++]=128|u&63}else if(u<=65535){if(pn+2>=pm)break;ps[pn++]=224|u>>12;ps[pn++]=128|u>>6&63;ps[pn++]=128|u&63}else if(u<=2097151){if(pn+3>=pm)break;ps[pn++]=240|u>>18;ps[pn++]=128|u>>12&63;ps[pn++]=128|u>>6&63;ps[pn++]=128|u&63}else if(u<=67108863){if(pn+4>=pm)break;ps[pn++]=248|u>>24;ps[pn++]=128|u>>18&63;ps[pn++]=128|u>>12&63;ps[pn++]=128|u>>6&63;ps[pn++]=128|u&63}else{if(pn+5>=pm)break;ps[pn++]=252|u>>30;ps[pn++]=128|u>>24&63;ps[pn++]=128|u>>18&63;ps[pn++]=128|u>>12&63;ps[pn++]=128|u>>6&63;ps[pn++]=128|u&63}}ps[pn]=0;Rq.set(ps,pt);b=pt;var d=0,e=0,f=0,g=0,h=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0,M=0,N=0,O=0,P=0,Q=0,R=0,S=0,T=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(sa+125479053+xa-125479053)|~1)&(566281542|~566281542))))|0;Ua=(za|0)%4|0;Ua=0-(0-(Ua<<2)+(0-1639813410))-1628865018+((Z(Ua+ -946902778+ -1+946902778|0,Ua)|0)/2|0)+1628865018|0;Ga=Ua+ -705355747+ -1639813405+705355747|0;Pa=sa<<Ga;Ua=sa>>>(1639813437+ -1775524201-Ua+1775524201|0);Ua=Pa&Ua|Pa^Ua;Pa=(ua^~1)&ua;Oa=0-(0-ua+(0-1859242102))|0;Oa=~(~(((Oa^~-2)&Oa)+403699684+Ua+ -403699684)|~-2)&(~-221245562|-221245562);Qa=~Oa;Ra=~Pa;Sa=~-2075741683;ib=~(~Ua|~1)&(~-1546354233|-1546354233);hb=~ib;gb=~-1859242102;g=~-1973195180;Va=Ka;Wa=Ja;Xa=Ha;Ya=d;Za=e;_a=Fa;$a=Ea;ab=Da;bb=Ca;cb=Ba;db=ya;eb=va;fb=ua;ta=wa;f=119;ua=0-(0-((hb&-1973195180|ib&g)^(gb&-1973195180|-1859242102&g)|~(hb|gb)&(-1973195180|g))+(0-((Qa&-2075741683|Oa&Sa)^(Ra&-2075741683|Pa&Sa)|~(Qa|Ra)&(-2075741683|Sa))))|0;xa=Ua;za=0-(0-za+(0-1))|0;Ka=Va;Ja=Wa;Ha=Xa;d=Ya;e=Za;Fa=_a;Ea=$a;Da=ab;Ca=bb;Ba=cb;ya=db;wa=eb;va=fb;continue a}case 97:{Qa=Ka;Ra=Ja;Sa=Ia;Ua=Ha;Va=Ga;Wa=d;Xa=e;Ya=Fa;Za=Ea;_a=Da;$a=Ca;ab=Ba;bb=za;cb=ya;db=xa;eb=wa;fb=va;gb=ua;hb=ta;ib=sa;f=(za|0)<48?95:63;Ka=Qa;Ja=Ra;Ia=Sa;Ha=Ua;Ga=Va;d=Wa;e=Xa;Fa=Ya;Ea=Za;Da=_a;Ca=$a;Ba=ab;za=bb;ya=cb;xa=db;wa=eb;va=fb;ua=gb;ta=hb;sa=ib;continue a}case 95:{Qa=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063;c[k>>2]=-1990404162;c[l>>2]=1804603682;c[m>>2]=-40341101;c[n>>2]=-1502002290;c[o>>2]=1236535329;c[p>>2]=-165796510;c[q>>2]=-1069501632;c[r>>2]=643717713;c[s>>2]=-373897302;c[t>>2]=-701558691;c[v>>2]=38016083;c[w>>2]=-660478335;c[x>>2]=-405537848;c[y>>2]=568446438;c[z>>2]=-1019803690;c[A>>2]=-187363961;c[B>>2]=1163531501;c[C>>2]=-1444681467;c[D>>2]=-51403784;c[E>>2]=1735328473;c[G>>2]=-1926607734;c[H>>2]=-378558;c[I>>2]=-2022574463;c[J>>2]=1839030562;c[K>>2]=-35309556;c[L>>2]=-1530992060;c[M>>2]=1272893353;c[N>>2]=-155497632;c[O>>2]=-1094730640;c[P>>2]=681279174;c[R>>2]=-358537222;c[S>>2]=-722521979;c[T>>2]=76029189;c[U>>2]=-640364487;c[V>>2]=-421815835;c[W>>2]=530742520;c[X>>2]=-995338651;c[Y>>2]=-198630844;c[_>>2]=1126891415;c[$>>2]=-1416354905;c[ba>>2]=-57434055;c[ca>>2]=1700485571;c[da>>2]=-1894986606;c[ea>>2]=-1051523;c[fa>>2]=-2054922799;c[ga>>2]=1873313359;c[ha>>2]=-30611744;c[ia>>2]=-1560198380;c[ja>>2]=1309151649;c[ka>>2]=-145523070;c[ma>>2]=-1120210379;c[na>>2]=718787259;c[oa>>2]=-343485551;$a=Ka;ab=Ja;bb=Ia;cb=Ha;db=d;eb=e;fb=Fa;gb=Ea;hb=Da;ib=Ca;f=74;sa=0;ta=1732584193;ua=-271733879;va=-1732584194;wa=271733878;xa=1732584193;ya=0;za=0;Ba=0;Ga=1;Ka=$a;Ja=ab;Ia=bb;Ha=cb;d=db;e=eb;Fa=fb;Ea=gb;Da=hb;Ca=ib;continue a}case 77:{Ra=Ka;Sa=Ja;Ua=Ia;Va=Ha;Wa=Ga;Xa=d;Ya=e;Za=Fa;_a=Ea;$a=Da;ab=Ca;bb=Ba;cb=za;db=ya;eb=wa;fb=va;gb=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sa=ib;continue a}case 137:{Qa=Ka;Ra=Ja;Sa=Ia;Ua=Ha;Va=Ga;Wa=d;Xa=e;Ya=Fa;Za=Ea;_a=Da;$a=Ca;ab=Ba;bb=za;cb=ya;db=xa;eb=wa;fb=va;gb=ua;hb=ta;ib=sa;f=(Ia|0)>(sa|0)?136:133;Ka=Qa;Ja=Ra;Ia=Sa;Ha=Ua;Ga=Va;d=Wa;e=Xa;Fa=Ya;Ea=Za;Da=_a;Ca=$a;Ba=ab;za=bb;ya=cb;xa=db;wa=eb;va=fb;ua=gb;ta=hb;sa=ib;continue a}case 23:{sa=c[Aa+(za<<2)>>2]|0;Ga=(~(~sa|~-2)&(~-1999460729|-1999460729))+729837134+xa+ -729837134|0;Ga=(Ga^~-2)&Ga;Ia=(sa^~1)&sa;Ia=(Ga&Ia|Ga^Ia)-1663655995+(~(~xa|~1)&(1797841953|~1797841953))+1663655995|0;Ga=Ia+ -2098496209+((Ha^~-2)&Ha)+2098496209|0;Ga=(Ga^~-2)&Ga;Ua=(Ha^~1)&Ha;sa=(Ga&Ua|Ga^Ua)-(0-(~(~(0-(0-sa+(0-xa)))|~1)&(1854390030|~1854390030)))|0;Ua=(za|0)%4|0;Ua=(Ua<<2)-23571533+601048392+23571533-(0-((Z(0-(0-Ua+(0+1))|0,Ua)|0)/2|0))|0;Ga=Ua-(0+601048386)|0;Va=sa<<Ga;Ua=sa>>>(601048418+(0-Ua)|0);Ra=~Va;Sa=~Ua;Xa=~-1777071147;Xa=(Ra&-1777071147|Va&Xa)^(Sa&-1777071147|Ua&Xa)|~(Ra|Sa)&(-1777071147|Xa);Sa=(ua^~1)&ua;Ra=(~(~(ua+ -1742022525+1578590490+1742022525)|~-2)&(~-66713274|-66713274))+ -702715349+Xa+702715349|0;Ra=(Ra^~-2)&Ra;Ua=~Ra;Va=~Sa;Wa=~1317685325;g=(Xa^~1)&Xa;Oa=~g;Pa=~-1578590490;Qa=~225229394;Ya=Ka;Za=Ja;_a=Ha;$a=d;ab=e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0-sa)<<2)>>2]|0;Ka=Ra;Ja=Sa;Ia=Ua;Ha=Va;Ga=Wa;d=Xa;e=Ya;Fa=Za;Ea=_a;Da=$a;Ca=ab;Ba=bb;za=cb;ya=db;wa=eb;va=fb;ua=gb;ta=hb;sa=ib;continue a}case 21:{lb=(Ca^~1)&Ca;mb=ta-(0-33242356)+252947873+((Ca^~-2)&Ca)-252947873|0;mb=(mb^~-2)&mb;kb=~mb;jb=~lb;g=~-380726747;qb=~(~ta|~1)&(~-1162696414|-1162696414);pb=~qb;ob=~-33242356;nb=~-306070462;Ra=((Ea^~-2)&Ea)-1609523247+va+1609523247|0;Ra=(Ra^~-2)&Ra;Sa=~(~Ea|~1)&(1191657700|~1191657700);Ua=~(~(((Fa^~-2)&Fa)-1778799498+wa+1778799498)|~-2)&(876893045|~876893045);Va=(Fa^~1)&Fa;Pa=ua-(0-924935704)+ -2103109303+((Da^~-2)&Da)+2103109303|0;Pa=(Pa^~-2)&Pa;Qa=(Da^~1)&Da;Oa=(ua^~1)&ua;Wa=Ka;Xa=Ja;Ya=Ia;Za=Ha;_a=Ga;$a=d;ab=e;bb=Fa;cb=Ea;db=Da;eb=Ca;fb=Ba;gb=za;hb=xa;ib=sa;f=146;ta=((pb&-306070462|qb&nb)^(ob&-306070462|-33242356&nb)|~(pb|ob)&(-306070462|nb))-(0-((kb&-380726747|mb&g)^(jb&-380726747|lb&g)|~(kb|jb)&(-380726747|g)))|0;ua=(Oa&-924935704|Oa^-924935704)-937268693+(Pa&Qa|Pa^Qa)+937268693|0;va=0-(0-(Ra&Sa|Ra^Sa)+(0-(~(~va|~1)&(1631560841|~1631560841))))|0;wa=(Ua&Va|Ua^Va)-(0-((wa^~1)&wa))|0;ya=0-(0-ya+(0-16))|0;Ka=Wa;Ja=Xa;Ia=Ya;Ha=Za;Ga=_a;d=$a;e=ab;Fa=bb;Ea=cb;Da=db;Ca=eb;Ba=fb;za=gb;xa=hb;sa=ib;continue a}case 134:{_a=Ka;$a=Ja;ab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=$a;Ia=ab;Ha=bb;Ga=cb;d=db;e=eb;Fa=fb;Ea=gb;Da=hb;Ca=ib;Ba=jb;za=kb;ya=lb;wa=mb;va=nb;ua=ob;ta=pb;sa=qb;continue a}case 8:{_a=Ka;$a=Ja;ab=Ia;bb=Ha;cb=Ga;db=d;eb=e;fb=Fa;gb=Ea;hb=Da;ib=Ca;jb=Ba;kb=ya;lb=xa;mb=wa;nb=va;ob=ua;pb=ta;qb=sa;f=4;za=0;Ka=_a;Ja=$a;Ia=ab;Ha=bb;Ga=cb;d=db;e=eb;Fa=fb;Ea=gb;Da=hb;Ca=ib;Ba=jb;ya=kb;xa=lb;wa=mb;va=nb;ua=ob;ta=pb;sa=qb;continue a}case 121:{Ia=c[Aa+(za<<2)>>2]|0;sa=~(~Ia|~1)&(1316696592|~1316696592);Ia=~(~(0-(0-(0-(0-xa+(0+96809952)))+(0-(~(~Ia|~-2)&(~-427127086|-427127086)))))|~-2)&(~-1132267683|-1132267683);Ga=(xa^~1)&xa;bb=~Ga;eb=~-524507312;cb=~-205119057;sa=0-(0-((bb&-205119057|Ga&cb)^(eb&-205119057|-524507312&cb)|~(bb|eb)&(-205119057|cb))+(0-(Ia&sa|Ia^sa)))|0;Ia=0-(0-sa+(0-621317264))|0;cb=(Ha^~1)&Ha;eb=~(~(Ia-(0-((Ha^~-2)&Ha)))|~-2)&(~-128080197|-128080197);bb=~eb;Ga=~cb;db=~-1186168603;sa=~(~(-621317265+1818258150-sa-1818258150)|~1)&(1091295736|~1091295736);sa=((bb&-1186168603|eb&db)^(Ga&-1186168603|cb&db)|~(bb|Ga)&(-1186168603|db))-1517567764+(1&~sa|sa&~1)+1517567764|0;db=((za|0)%4|0)*5|0;Ga=db-(0-7)|0;bb=sa<<Ga;db=sa>>>(25+(0-db)|0);db=bb&db|bb^db;bb=~(~(db+1491303093+((ua^~-2)&ua)+ -1491303093)|~-2)&(1301399310|~1301399310);cb=(ua^~1)&ua;eb=Ka;fb=Ja;gb=Ha;hb=d;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;ab=Ha;bb=Ga;cb=d;db=e;eb=Fa;fb=Ea;gb=Da;hb=Ca;ib=Ba;jb=za;kb=ya;lb=xa;mb=wa;nb=va;ob=ua;pb=ta;qb=sa;f=(za|0)<4?0:152;Ka=Za;Ja=_a;Ia=$a;Ha=ab;Ga=bb;d=cb;e=db;Fa=eb;Ea=fb;Da=gb;Ca=hb;Ba=ib;za=jb;ya=kb;xa=lb;wa=mb;va=nb;ua=ob;ta=pb;sa=qb;continue a}case 117:{Ha=~wa|0|wa&~-1;Za=223327204&~ua|ua&~223327204;ab=~Za;Ia=~Ha;$a=~-381686885;$a=(ab&-381686885|Za&$a)^(Ia&-381686885|Ha&$a)|~(ab|Ia)&(-381686885|$a);Ia=~2088055561;Ia=(2088055561&~va|va&Ia)^(~223327204&2088055561|223327204&Ia);ab=~wa;Za=~Ia;_a=~-1424487794;_a=(ab&-1424487794|wa&_a)^(Za&-1424487794|Ia&_a)|~(ab|Za)&(-1424487794|_a);$a=($a^~223327204)&$a;Za=~(~ua|~-223327205)&(~-1513562601|-1513562601);Za=(Za^~wa)&Za;_a=(_a^~223327204)&_a;Ha=(Ha^~-223327205)&Ha;Ha=(Ha^~(va&~wa|wa&~va))&Ha;Za=$a&Za|$a^Za;_a=Ha&_a|Ha^_a;Ha=~539859515;Ha=(539859515&~_a|_a&Ha)^(~Za&539859515|Za&Ha);Za=~(~((~(~ta|~-2)&(~-479053452|-479053452))-(0-Ha))|~-2)&(775604796|~775604796);_a=(ta^~1)&ta;$a=~Za;ab=~_a;Ia=~-89952541;bb=Ka;cb=Ja;db=Ga;eb=d;fb=e;gb=Fa;hb=Ea;ib=Da;jb=Ca;kb=Ba;lb=za;mb=ya;nb=wa;ob=va;pb=ua;qb=ta;f=116;sa=0-(0-Ba+(0+1))>>2;xa=Ha;Ha=(($a&-89952541|Za&Ia)^(ab&-89952541|_a&Ia)|~($a|ab)&(-89952541|Ia))+1116549971+(~(~Ha|~1)&(~-875125272|-875125272))-1116549971|0;Ia=0-(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;Ha=bb;Ga=cb;d=db;e=eb;Fa=fb;Ea=gb;Da=hb;Ca=ib;Ba=jb;za=kb;ya=lb;wa=mb;va=nb;ua=ob;ta=pb;sa=qb;continue a}default:{Za=Ka;_a=Ja;$a=Ia;ab=Ha;bb=Ga;cb=d;db=e;eb=Fa;fb=Ea;gb=Da;hb=Ca;ib=Ba;jb=za;kb=ya;lb=xa;mb=wa;nb=va;ob=ua;pb=ta;qb=sa;Ka=Za;Ja=_a;Ia=$a;Ha=ab;Ga=bb;d=cb;e=db;Fa=eb;Ea=fb;Da=gb;Ca=hb;Ba=ib;za=jb;ya=kb;xa=lb;wa=mb;va=nb;ua=ob;ta=pb;sa=qb;continue a}}while(0);if((Ma|0)==136){i=Na;var ch=0;var ci=0;while(1){var ct=Rq[d+ci>>0];ch|=ct;if(ct==0)break;ci++}var cr="";if(ch<128){var cu;while(ci>0){cu=String.fromCharCode.apply(String,Rq.subarray(d,d+Math.min(ci,1024)));cr=cr?cr+cu:cu;d+=1024;ci-=1024}return cr}}i=Na;return 0}function cmd5xt(a,c,pt){a=a|0;var b=0,d=0,e=0,f=0,g=0,h=0,i=0,j=0,k=0,l=0,m=0,n=0,o=0,p=0,q=0,r=0,s=0,t=0,u=0,v=0,w=0,x=0,y=0,z=0,A=0,B=0,C=0,D=0,E=0,F=0,G=0,H=0,I=0,J=0,K=0,L=0;do if(a>>>0<245){o=a>>>0<11?16:a+11&-8;a=o>>>3;j=c[48]|0;b=j>>>a;if(b&3|0){b=(b&1^1)+a|0;d=232+(b<<1<<2)|0;e=d+8|0;f=c[e>>2]|0;g=f+8|0;h=c[g>>2]|0;do if((d|0)!=(h|0)){a=h+12|0;if((c[a>>2]|0)==(f|0)){c[a>>2]=d;c[e>>2]=h;break}}else c[48]=j&~(1<<b);while(0);L=b<<3;c[f+4>>2]=L|3;L=f+L+4|0;c[L>>2]=c[L>>2]|1;L=g;return L|0}h=c[50]|0;if(o>>>0>h>>>0){if(b|0){d=2<<a;d=b<<a&(d|0-d);d=(d&0-d)+ -1|0;i=d>>>12&16;d=d>>>i;f=d>>>5&8;d=d>>>f;g=d>>>2&4;d=d>>>g;e=d>>>1&2;d=d>>>e;b=d>>>1&1;b=(f|i|g|e|b)+(d>>>b)|0;d=232+(b<<1<<2)|0;e=d+8|0;g=c[e>>2]|0;i=g+8|0;f=c[i>>2]|0;do if((d|0)!=(f|0)){a=f+12|0;if((c[a>>2]|0)==(g|0)){c[a>>2]=d;c[e>>2]=f;k=c[50]|0;break}}else{c[48]=j&~(1<<b);k=h}while(0);h=(b<<3)-o|0;c[g+4>>2]=o|3;e=g+o|0;c[e+4>>2]=h|1;c[e+h>>2]=h;if(k|0){f=c[53]|0;b=k>>>3;d=232+(b<<1<<2)|0;a=c[48]|0;b=1<<b;if(a&b){a=d+8|0;b=c[a>>2]|0;if(!(b>>>0<(c[52]|0)>>>0)){l=a;m=b}}else{c[48]=a|b;l=d+8|0;m=d}c[l>>2]=f;c[m+12>>2]=f;c[f+8>>2]=m;c[f+12>>2]=d}c[50]=h;c[53]=e;L=i;return L|0}a=c[49]|0;if(a){d=(a&0-a)+ -1|0;K=d>>>12&16;d=d>>>K;J=d>>>5&8;d=d>>>J;L=d>>>2&4;d=d>>>L;b=d>>>1&2;d=d>>>b;e=d>>>1&1;e=c[496+((J|K|L|b|e)+(d>>>e)<<2)>>2]|0;d=(c[e+4>>2]&-8)-o|0;b=e;while(1){a=c[b+16>>2]|0;if(!a){a=c[b+20>>2]|0;if(!a){j=e;break}}b=(c[a+4>>2]&-8)-o|0;L=b>>>0<d>>>0;d=L?b:d;b=a;e=L?a:e}g=c[52]|0;i=j+o|0;h=c[j+24>>2]|0;e=c[j+12>>2]|0;do if((e|0)==(j|0)){b=j+20|0;a=c[b>>2]|0;if(!a){b=j+16|0;a=c[b>>2]|0;if(!a){n=0;break}}while(1){e=a+20|0;f=c[e>>2]|0;if(f|0){a=f;b=e;continue}e=a+16|0;f=c[e>>2]|0;if(!f)break;else{a=f;b=e}}if(!(b>>>0<g>>>0)){c[b>>2]=0;n=a;break}}else{f=c[j+8>>2]|0;a=f+12|0;b=e+8|0;if((c[b>>2]|0)==(j|0)){c[a>>2]=e;c[b>>2]=f;n=e;break}}while(0);do if(h|0){a=c[j+28>>2]|0;b=496+(a<<2)|0;if((j|0)==(c[b>>2]|0)){c[b>>2]=n;if(!n){c[49]=c[49]&~(1<<a);break}}else{a=h+16|0;if((c[a>>2]|0)==(j|0))c[a>>2]=n;else c[h+20>>2]=n;if(!n)break}b=c[52]|0;c[n+24>>2]=h;a=c[j+16>>2]|0;do if(a|0)if(!(a>>>0<b>>>0)){c[n+16>>2]=a;c[a+24>>2]=n;break}while(0);a=c[j+20>>2]|0;if(a|0)if(!(a>>>0<(c[52]|0)>>>0)){c[n+20>>2]=a;c[a+24>>2]=n;break}}while(0);if(d>>>0<16){L=d+o|0;c[j+4>>2]=L|3;L=j+L+4|0;c[L>>2]=c[L>>2]|1}else{c[j+4>>2]=o|3;c[i+4>>2]=d|1;c[i+d>>2]=d;a=c[50]|0;if(a|0){f=c[53]|0;b=a>>>3;e=232+(b<<1<<2)|0;a=c[48]|0;b=1<<b;if(a&b){a=e+8|0;b=c[a>>2]|0;if(!(b>>>0<(c[52]|0)>>>0)){p=a;q=b}}else{c[48]=a|b;p=e+8|0;q=e}c[p>>2]=f;c[q+12>>2]=f;c[f+8>>2]=q;c[f+12>>2]=e}c[50]=d;c[53]=i}L=j+8|0;return L|0}}}else if(a>>>0<=4294967231){a=a+11|0;o=a&-8;j=c[49]|0;if(j){d=0-o|0;a=a>>>8;if(a)if(o>>>0>16777215)i=31;else{q=(a+1048320|0)>>>16&8;E=a<<q;p=(E+520192|0)>>>16&4;E=E<<p;i=(E+245760|0)>>>16&2;i=14-(p|q|i)+(E<<i>>>15)|0;i=o>>>(i+7|0)&1|i<<1}else i=0;b=c[496+(i<<2)>>2]|0;a:do if(!b){a=0;b=0;E=86}else{f=d;a=0;g=o<<((i|0)==31?0:25-(i>>>1)|0);h=b;b=0;while(1){e=c[h+4>>2]&-8;d=e-o|0;if(d>>>0<f>>>0)if((e|0)==(o|0)){a=h;b=h;E=90;break a}else b=h;else d=f;e=c[h+20>>2]|0;h=c[h+16+(g>>>31<<2)>>2]|0;a=(e|0)==0|(e|0)==(h|0)?a:e;e=(h|0)==0;if(e){E=86;break}else{f=d;g=g<<(e&1^1)}}}while(0);if((E|0)==86){if((a|0)==0&(b|0)==0){a=2<<i;a=j&(a|0-a);if(!a)break;q=(a&0-a)+ -1|0;m=q>>>12&16;q=q>>>m;l=q>>>5&8;q=q>>>l;n=q>>>2&4;q=q>>>n;p=q>>>1&2;q=q>>>p;a=q>>>1&1;a=c[496+((l|m|n|p|a)+(q>>>a)<<2)>>2]|0}if(!a){i=d;j=b}else E=90}if((E|0)==90)while(1){E=0;q=(c[a+4>>2]&-8)-o|0;e=q>>>0<d>>>0;d=e?q:d;b=e?a:b;e=c[a+16>>2]|0;if(e|0){a=e;E=90;continue}a=c[a+20>>2]|0;if(!a){i=d;j=b;break}else E=90}if((j|0)!=0?i>>>0<((c[50]|0)-o|0)>>>0:0){f=c[52]|0;h=j+o|0;g=c[j+24>>2]|0;d=c[j+12>>2]|0;do if((d|0)==(j|0)){b=j+20|0;a=c[b>>2]|0;if(!a){b=j+16|0;a=c[b>>2]|0;if(!a){s=0;break}}while(1){d=a+20|0;e=c[d>>2]|0;if(e|0){a=e;b=d;continue}d=a+16|0;e=c[d>>2]|0;if(!e)break;else{a=e;b=d}}if(!(b>>>0<f>>>0)){c[b>>2]=0;s=a;break}}else{e=c[j+8>>2]|0;a=e+12|0;b=d+8|0;if((c[b>>2]|0)==(j|0)){c[a>>2]=d;c[b>>2]=e;s=d;break}}while(0);do if(g|0){a=c[j+28>>2]|0;b=496+(a<<2)|0;if((j|0)==(c[b>>2]|0)){c[b>>2]=s;if(!s){c[49]=c[49]&~(1<<a);break}}else{a=g+16|0;if((c[a>>2]|0)==(j|0))c[a>>2]=s;else c[g+20>>2]=s;if(!s)break}b=c[52]|0;c[s+24>>2]=g;a=c[j+16>>2]|0;do if(a|0)if(!(a>>>0<b>>>0)){c[s+16>>2]=a;c[a+24>>2]=s;break}while(0);a=c[j+20>>2]|0;if(a|0)if(!(a>>>0<(c[52]|0)>>>0)){c[s+20>>2]=a;c[a+24>>2]=s;break}}while(0);do if(i>>>0>=16){c[j+4>>2]=o|3;c[h+4>>2]=i|1;c[h+i>>2]=i;a=i>>>3;if(i>>>0<256){d=232+(a<<1<<2)|0;b=c[48]|0;a=1<<a;if(b&a){a=d+8|0;b=c[a>>2]|0;if(!(b>>>0<(c[52]|0)>>>0)){u=a;v=b}}else{c[48]=b|a;u=d+8|0;v=d}c[u>>2]=h;c[v+12>>2]=h;c[h+8>>2]=v;c[h+12>>2]=d;break}a=i>>>8;if(a)if(i>>>0>16777215)d=31;else{K=(a+1048320|0)>>>16&8;L=a<<K;J=(L+520192|0)>>>16&4;L=L<<J;d=(L+245760|0)>>>16&2;d=14-(J|K|d)+(L<<d>>>15)|0;d=i>>>(d+7|0)&1|d<<1}else d=0;e=496+(d<<2)|0;c[h+28>>2]=d;a=h+16|0;c[a+4>>2]=0;c[a>>2]=0;a=c[49]|0;b=1<<d;if(!(a&b)){c[49]=a|b;c[e>>2]=h;c[h+24>>2]=e;c[h+12>>2]=h;c[h+8>>2]=h;break}f=i<<((d|0)==31?0:25-(d>>>1)|0);a=c[e>>2]|0;while(1){if((c[a+4>>2]&-8|0)==(i|0)){d=a;E=148;break}b=a+16+(f>>>31<<2)|0;d=c[b>>2]|0;if(!d){E=145;break}else{f=f<<1;a=d}}if((E|0)==145)if(!(b>>>0<(c[52]|0)>>>0)){c[b>>2]=h;c[h+24>>2]=a;c[h+12>>2]=h;c[h+8>>2]=h;break}else if((E|0)==148){a=d+8|0;b=c[a>>2]|0;L=c[52]|0;if(b>>>0>=L>>>0&d>>>0>=L>>>0){c[b+12>>2]=h;c[a>>2]=h;c[h+8>>2]=b;c[h+12>>2]=d;c[h+24>>2]=0;break}}}else{L=i+o|0;c[j+4>>2]=L|3;L=j+L+4|0;c[L>>2]=c[L>>2]|1}while(0);L=j+8|0;return L|0}}}else o=-1;while(0);d=c[50]|0;if(d>>>0>=o>>>0){a=d-o|0;b=c[53]|0;if(a>>>0>15){L=b+o|0;c[53]=L;c[50]=a;c[L+4>>2]=a|1;c[L+a>>2]=a;c[b+4>>2]=o|3}else{c[50]=0;c[53]=0;c[b+4>>2]=d|3;L=b+d+4|0;c[L>>2]=c[L>>2]|1}L=b+8|0;return L|0}a=c[51]|0;if(a>>>0>o>>>0){J=a-o|0;c[51]=J;L=c[54]|0;K=L+o|0;c[54]=K;c[K+4>>2]=J|1;c[L+4>>2]=o|3;L=L+8|0;return L|0}do if(!(c[166]|0)){a=4096;if(!(a+ -1&a)){c[168]=a;c[167]=a;c[169]=-1;c[170]=-1;c[171]=0;c[159]=0;c[166]=Date.now()/1e3&-16^1431655768;break}}while(0);h=o+48|0;g=c[168]|0;i=o+47|0;f=g+i|0;g=0-g|0;j=f&g;if(j>>>0<=o>>>0){L=0;return L|0}a=c[158]|0;if(a|0?(u=c[156]|0,v=u+j|0,v>>>0<=u>>>0|v>>>0>a>>>0):0){L=0;return L|0}b:do if(!(c[159]&4)){a=c[54]|0;c:do if(a){d=640;while(1){b=c[d>>2]|0;if(b>>>0<=a>>>0?(r=d+4|0,(b+(c[r>>2]|0)|0)>>>0>a>>>0):0){e=d;d=r;break}d=c[d+8>>2]|0;if(!d){E=173;break c}}a=f-(c[51]|0)&g;if(a>>>0<2147483647){b=pt;if((b|0)==((c[e>>2]|0)+(c[d>>2]|0)|0)){if((b|0)!=(-1|0)){h=b;f=a;E=193;break b}}else E=183}}else E=173;while(0);do if((E|0)==173?(t=pt,(t|0)!=(-1|0)):0){a=t;b=c[167]|0;d=b+ -1|0;if(!(d&a))a=j;else a=j-a+(d+a&0-b)|0;b=c[156]|0;d=b+a|0;if(a>>>0>o>>>0&a>>>0<2147483647){v=c[158]|0;if(v|0?d>>>0<=b>>>0|d>>>0>v>>>0:0)break;b=pt;if((b|0)==(t|0)){h=t;f=a;E=193;break b}else E=183}}while(0);d:do if((E|0)==183){d=0-a|0;do if(h>>>0>a>>>0&(a>>>0<2147483647&(b|0)!=(-1|0))?(w=c[168]|0,w=i-a+w&0-w,w>>>0<2147483647):0)if(pt==(-1|0)){pt;break d}else{a=w+a|0;break}while(0);if((b|0)!=(-1|0)){h=b;f=a;E=193;break b}}while(0);c[159]=c[159]|4;E=190}else E=190;while(0);if((((E|0)==190?j>>>0<2147483647:0)?(x=pt,y=pt,x>>>0<y>>>0&((x|0)!=(-1|0)&(y|0)!=(-1|0))):0)?(z=y-x|0,z>>>0>(o+40|0)>>>0):0){h=x;f=z;E=193}if((E|0)==193){a=(c[156]|0)+f|0;c[156]=a;if(a>>>0>(c[157]|0)>>>0)c[157]=a;i=c[54]|0;do if(i){e=640;do{a=c[e>>2]|0;b=e+4|0;d=c[b>>2]|0;if((h|0)==(a+d|0)){A=a;B=b;C=d;D=e;E=203;break}e=c[e+8>>2]|0}while((e|0)!=0);if(((E|0)==203?(c[D+12>>2]&8|0)==0:0)?i>>>0<h>>>0&i>>>0>=A>>>0:0){c[B>>2]=C+f;L=i+8|0;L=(L&7|0)==0?0:0-L&7;K=i+L|0;L=f-L+(c[51]|0)|0;c[54]=K;c[51]=L;c[K+4>>2]=L|1;c[K+L+4>>2]=40;c[55]=c[170];break}a=c[52]|0;if(h>>>0<a>>>0){c[52]=h;j=h}else j=a;d=h+f|0;a=640;while(1){if((c[a>>2]|0)==(d|0)){b=a;E=211;break}a=c[a+8>>2]|0;if(!a){b=640;break}}if((E|0)==211)if(!(c[a+12>>2]&8)){c[b>>2]=h;l=a+4|0;c[l>>2]=(c[l>>2]|0)+f;l=h+8|0;l=h+((l&7|0)==0?0:0-l&7)|0;a=d+8|0;a=d+((a&7|0)==0?0:0-a&7)|0;k=l+o|0;g=a-l-o|0;c[l+4>>2]=o|3;do if((a|0)!=(i|0)){if((a|0)==(c[53]|0)){L=(c[50]|0)+g|0;c[50]=L;c[53]=k;c[k+4>>2]=L|1;c[k+L>>2]=L;break}b=c[a+4>>2]|0;if((b&3|0)==1){i=b&-8;f=b>>>3;e:do if(b>>>0>=256){h=c[a+24>>2]|0;e=c[a+12>>2]|0;do if((e|0)==(a|0)){d=a+16|0;e=d+4|0;b=c[e>>2]|0;if(!b){b=c[d>>2]|0;if(!b){J=0;break}}else d=e;while(1){e=b+20|0;f=c[e>>2]|0;if(f|0){b=f;d=e;continue}e=b+16|0;f=c[e>>2]|0;if(!f)break;else{b=f;d=e}}if(!(d>>>0<j>>>0)){c[d>>2]=0;J=b;break}}else{f=c[a+8>>2]|0;b=f+12|0;d=e+8|0;if((c[d>>2]|0)==(a|0)){c[b>>2]=e;c[d>>2]=f;J=e;break}}while(0);if(!h)break;b=c[a+28>>2]|0;d=496+(b<<2)|0;do if((a|0)!=(c[d>>2]|0)){b=h+16|0;if((c[b>>2]|0)==(a|0))c[b>>2]=J;else c[h+20>>2]=J;if(!J)break e}else{c[d>>2]=J;if(J|0)break;c[49]=c[49]&~(1<<b);break e}while(0);e=c[52]|0;c[J+24>>2]=h;b=a+16|0;d=c[b>>2]|0;do if(d|0)if(!(d>>>0<e>>>0)){c[J+16>>2]=d;c[d+24>>2]=J;break}while(0);b=c[b+4>>2]|0;if(!b)break;if(!(b>>>0<(c[52]|0)>>>0)){c[J+20>>2]=b;c[b+24>>2]=J;break}}else{d=c[a+8>>2]|0;e=c[a+12>>2]|0;b=232+(f<<1<<2)|0;do if((d|0)!=(b|0)){if((c[d+12>>2]|0)==(a|0))break}while(0);if((e|0)==(d|0)){c[48]=c[48]&~(1<<f);break}do if((e|0)==(b|0))G=e+8|0;else{b=e+8|0;if((c[b>>2]|0)==(a|0)){G=b;break}}while(0);c[d+12>>2]=e;c[G>>2]=d}while(0);a=a+i|0;g=i+g|0}a=a+4|0;c[a>>2]=c[a>>2]&-2;c[k+4>>2]=g|1;c[k+g>>2]=g;a=g>>>3;if(g>>>0<256){d=232+(a<<1<<2)|0;b=c[48]|0;a=1<<a;do if(!(b&a)){c[48]=b|a;K=d+8|0;L=d}else{a=d+8|0;b=c[a>>2]|0;if(b>>>0>=(c[52]|0)>>>0){K=a;L=b;break}}while(0);c[K>>2]=k;c[L+12>>2]=k;c[k+8>>2]=L;c[k+12>>2]=d;break}a=g>>>8;do if(!a)d=0;else{if(g>>>0>16777215){d=31;break}K=(a+1048320|0)>>>16&8;L=a<<K;J=(L+520192|0)>>>16&4;L=L<<J;d=(L+245760|0)>>>16&2;d=14-(J|K|d)+(L<<d>>>15)|0;d=g>>>(d+7|0)&1|d<<1}while(0);e=496+(d<<2)|0;c[k+28>>2]=d;a=k+16|0;c[a+4>>2]=0;c[a>>2]=0;a=c[49]|0;b=1<<d;if(!(a&b)){c[49]=a|b;c[e>>2]=k;c[k+24>>2]=e;c[k+12>>2]=k;c[k+8>>2]=k;break}f=g<<((d|0)==31?0:25-(d>>>1)|0);a=c[e>>2]|0;while(1){if((c[a+4>>2]&-8|0)==(g|0)){d=a;E=281;break}b=a+16+(f>>>31<<2)|0;d=c[b>>2]|0;if(!d){E=278;break}else{f=f<<1;a=d}}if((E|0)==278)if(!(b>>>0<(c[52]|0)>>>0)){c[b>>2]=k;c[k+24>>2]=a;c[k+12>>2]=k;c[k+8>>2]=k;break}else if((E|0)==281){a=d+8|0;b=c[a>>2]|0;L=c[52]|0;if(b>>>0>=L>>>0&d>>>0>=L>>>0){c[b+12>>2]=k;c[a>>2]=k;c[k+8>>2]=b;c[k+12>>2]=d;c[k+24>>2]=0;break}}}else{L=(c[51]|0)+g|0;c[51]=L;c[54]=k;c[k+4>>2]=L|1}while(0);L=l+8|0;return L|0}else b=640;while(1){a=c[b>>2]|0;if(a>>>0<=i>>>0?(F=a+(c[b+4>>2]|0)|0,F>>>0>i>>>0):0){b=F;break}b=c[b+8>>2]|0}g=b+ -47|0;d=g+8|0;d=g+((d&7|0)==0?0:0-d&7)|0;g=i+16|0;d=d>>>0<g>>>0?i:d;a=d+8|0;e=h+8|0;e=(e&7|0)==0?0:0-e&7;L=h+e|0;e=f+ -40-e|0;c[54]=L;c[51]=e;c[L+4>>2]=e|1;c[L+e+4>>2]=40;c[55]=c[170];e=d+4|0;c[e>>2]=27;c[a>>2]=c[160];c[a+4>>2]=c[161];c[a+8>>2]=c[162];c[a+12>>2]=c[163];c[160]=h;c[161]=f;c[163]=0;c[162]=a;a=d+24|0;do{a=a+4|0;c[a>>2]=7}while((a+4|0)>>>0<b>>>0);if((d|0)!=(i|0)){h=d-i|0;c[e>>2]=c[e>>2]&-2;c[i+4>>2]=h|1;c[d>>2]=h;a=h>>>3;if(h>>>0<256){d=232+(a<<1<<2)|0;b=c[48]|0;a=1<<a;if(b&a){a=d+8|0;b=c[a>>2]|0;if(!(b>>>0<(c[52]|0)>>>0)){H=a;I=b}}else{c[48]=b|a;H=d+8|0;I=d}c[H>>2]=i;c[I+12>>2]=i;c[i+8>>2]=I;c[i+12>>2]=d;break}a=h>>>8;if(a)if(h>>>0>16777215)d=31;else{K=(a+1048320|0)>>>16&8;L=a<<K;J=(L+520192|0)>>>16&4;L=L<<J;d=(L+245760|0)>>>16&2;d=14-(J|K|d)+(L<<d>>>15)|0;d=h>>>(d+7|0)&1|d<<1}else d=0;f=496+(d<<2)|0;c[i+28>>2]=d;c[i+20>>2]=0;c[g>>2]=0;a=c[49]|0;b=1<<d;if(!(a&b)){c[49]=a|b;c[f>>2]=i;c[i+24>>2]=f;c[i+12>>2]=i;c[i+8>>2]=i;break}e=h<<((d|0)==31?0:25-(d>>>1)|0);a=c[f>>2]|0;while(1){if((c[a+4>>2]&-8|0)==(h|0)){d=a;E=307;break}b=a+16+(e>>>31<<2)|0;d=c[b>>2]|0;if(!d){E=304;break}else{e=e<<1;a=d}}if((E|0)==304)if(!(b>>>0<(c[52]|0)>>>0)){c[b>>2]=i;c[i+24>>2]=a;c[i+12>>2]=i;c[i+8>>2]=i;break}else if((E|0)==307){a=d+8|0;b=c[a>>2]|0;L=c[52]|0;if(b>>>0>=L>>>0&d>>>0>=L>>>0){c[b+12>>2]=i;c[a>>2]=i;c[i+8>>2]=b;c[i+12>>2]=d;c[i+24>>2]=0;break}}}}else{L=c[52]|0;if((L|0)==0|h>>>0<L>>>0)c[52]=h;c[160]=h;c[161]=f;c[163]=0;c[57]=c[166];c[56]=-1;a=0;do{L=232+(a<<1<<2)|0;c[L+12>>2]=L;c[L+8>>2]=L;a=a+1|0}while((a|0)!=32);L=h+8|0;L=(L&7|0)==0?0:0-L&7;K=h+L|0;L=f+ -40-L|0;c[54]=K;c[51]=L;c[K+4>>2]=L|1;c[K+L+4>>2]=40;c[55]=c[170]}while(0);a=c[51]|0;if(a>>>0>o>>>0){J=a-o|0;c[51]=J;L=c[54]|0;K=L+o|0;c[54]=K;c[K+4>>2]=J|1;c[L+4>>2]=o|3;L=L+8|0;return L|0}}return 0}
    #         """) as vm:
    #     return await vm.call('cmd5x', s)
    # the param src below uses salt h2l6suw16pbtikmotf0j79cej4n8uw13
    #    01010031010000000000
    #    01010031010010000000
    #    01080031010000000000
    #    01080031010010000000
    #    03020031010000000000
    #    03020031010010000000
    #    03030031010000000000
    #    03030031010010000000
    #    02020031010000000000
    #    02020031010010000000
    return md5(s + 'h2l6suw16pbtikmotf0j79cej4n8uw13')


async def getdash(tvid, vid, bid=500):
    tm = int(time.time() * 1000)
    host = 'https://cache.video.iqiyi.com'
    params = {
        'tvid': tvid,
        'bid': bid,
        'vid': vid,
        'src': '01010031010000000000',
        'vt': 0,
        'rs': 1,
        'uid': '',
        'ori': 'pcw',
        'ps': 0,
        'tm': tm,
        'qd_v': 1,
        'k_uid': get_macid(),
        'pt': 0,
        'd': 0,
        's': '',
        'lid': '',
        'cf': '',
        'ct': '',
        'authKey': await cmd5x('0{}{}'.format(tm, tvid)),
        'k_tag': 1,
        'ost': 0,
        'ppt': 0,
        'locale': 'zh_cn',
        'pck': '',
        'k_err_retries': 0,
        'ut': 0
    }
    src = '/dash?{}'.format(urllib.parse.urlencode(params))
    vf = await cmd5x(src)
    req_url = '{}{}&vf={}'.format(host, src, vf)
    html = await get_url_service.get_url_async(req_url, allow_cache=False)
    return json.loads(html)


class IQiYiParser(Parser):
    filters = ['http(s?)://www.iqiyi.com/']
    un_supports = ['www.iqiyi.com/(lib/m|a_)']
    types = ["formats"]

    stream_types = [
        {'id': '4K-H264', 'container': 'flv', 'video_profile': '(6)4K-H264'},
        {'id': '4K-H265', 'container': 'flv', 'video_profile': '(6)4K-H265'},
        {'id': '1080P-H264', 'container': 'flv', 'video_profile': '(5)1080P-H264'},
        {'id': '1080P-H265', 'container': 'flv', 'video_profile': '(5)1080P-H265'},
        {'id': '720P-H264', 'container': 'flv', 'video_profile': '(4)720P-H264'},
        {'id': '720P-H265', 'container': 'flv', 'video_profile': '(4)720P-H265'},
        {'id': '540P-H264', 'container': 'flv', 'video_profile': '(3)540P-H264'},
        {'id': '540P-H265', 'container': 'flv', 'video_profile': '(3)540P-H265'},
        {'id': '360P-H264', 'container': 'flv', 'video_profile': '(2)360P-H264'},
        {'id': '210P-H264', 'container': 'flv', 'video_profile': '(1)210P-H264'},
    ]

    vd_2_id = {
        96: '210P-H264',
        1: '360P-H264',
        2: '540P-H264',
        21: '540P-H265',
        4: '720P-H264',
        17: '720P-H265',
        5: '1080P-H264',
        18: '1080P-H265',
        19: '4K-H265',
        10: '4K-H264',
    }

    parse_timeout = 60

    caption = "WWQ爱奇艺视频解析(桌面端接口)"

    def get_stream_type(self, stream_id):
        try:
            stream_id = self.vd_2_id[stream_id]
            stream_type = None
            for item in self.stream_types:
                if item["id"] == stream_id:
                    stream_type = item
                    break
        except:
            stream_id = str(stream_id)
            logging.warning("can't match stream_id " + stream_id)
            stream_type = {'id': stream_id, 'container': 'flv', 'video_profile': stream_id}
        return stream_type

    def label_to_id(self, label):
        for k, v in self.vd_2_id.items():
            if v == label:
                return k
        return label

    async def get_vid_and_title(self, url):
        html = await get_url_service.get_url_async(url)
        video_info = match1(html, ":video-info='(.+?)'")
        if video_info:
            video_info = json.loads(video_info)
            logging.debug(video_info)
            tvid = str(video_info['tvId'])
            videoid = str(video_info['vid'])
            title = str(video_info['name'])
        else:
            tvid = match1(html,
                          '#curid=(.+)_',
                          'data-player-tvid="([^"]+)"',
                          'tvid=([^&]+)',
                          'tvId:([^,]+)',
                          r'''param\['tvid'\]\s*=\s*"(.+?)"''',
                          r'"tvid":\s*"(\d+)"'
                          )
            videoid = match1(html,
                             '#curid=.+_(.*)$',
                             'data-player-videoid="([^"]+)"',
                             'vid=([^&]+)',
                             'vid:"([^"]+)',
                             r'''param\['vid'\]\s*=\s*"(.+?)"''',
                             r'"vid":\s*"(\w+)"'
                             )
            title = match1(html, '<title>([^<]+)').split('-')[0]
        return tvid, videoid, title

    async def get_vps_data(self, tvid, videoid, bid=None):
        vps_data = await getvps(tvid, videoid)
        assert vps_data['code'] == 'A00000', 'can\'t play this video!!'

        logging.debug('\n%s' % vps_data)

        return vps_data

    async def get_vs_array(self, vps_data):
        return vps_data['data']['vp']['tkl'][0]['vs']

    async def get_url_prefix(self, vps_data):
        return vps_data['data']['vp']['du']

    async def parse(self, input_text, *k, **kk):
        data = {
            "type": "formats",
            "name": "",
            "icon": "",
            "provider": "爱奇艺",
            "caption": self.caption,
            # "warning" : "提示信息",
            # "sorted" : 1,
            "data": []
        }
        url = input_text
        # html = await get_url_service.get_url_async(url)
        tvid, videoid, title = await self.get_vid_and_title(url)
        data["name"] = title
        vps_data = await self.get_vps_data(tvid, videoid)
        vs_array = await self.get_vs_array(vps_data)
        for vs in vs_array:
            if 'fs' not in vs:
                continue
            bid = vs['bid']
            stream_type = self.get_stream_type(bid)
            info = {
                "label": '-'.join([stream_type['video_profile'], stream_type['container']]),
                "code": stream_type['id'],
                "ext": stream_type['container'],
                "size": byte2size(vs['vsize']),
                # "type" : "",
                # "download": []
            }

            info1 = info.copy()
            data["data"].append(info1)
            info2 = info.copy()
            info2["label"] = '-'.join([info["label"], "单线程"])
            info2["code"] = '-'.join([str(info["code"]), "S"])
            data["data"].append(info2)
        return data

    async def parse_url(self, input_text, label, min=None, max=None, *k, **kk):
        async def _worker(url, url_list, in_pool):
            try:
                if len(url_list) > 5:
                    return
                json_data = await get_url_service.get_url_async(url, allow_cache=False)
                if not json_data:
                    return
                json_data = json.loads(json_data)
                logging.debug(json_data)
                down_url = json_data['l']
                # url_head = r1(r'https?://([^/]*)', down_url)
                if down_url not in url_list:
                    url_list.append(down_url)
            except asyncio.CancelledError:
                if not in_pool:
                    raise
            except:
                pass

        use_pool = True
        if "-S" in label:
            label = label.split("-S")[0]
            use_pool = False
        need_bid = self.label_to_id(label)
        url = input_text
        data = []
        tvid, videoid, title = await self.get_vid_and_title(url)
        vps_data = await self.get_vps_data(tvid, videoid, need_bid)
        vs_array = await self.get_vs_array(vps_data)
        url_prefix = await self.get_url_prefix(vps_data)
        for vs in vs_array:
            if 'fs' not in vs:
                continue
            bid = vs['bid']
            fs_array = vs['fs']
            # stream_type = self.get_stream_type(bid)
            if bid == need_bid:
                url_dict = dict()
                for seg_info in fs_array:
                    url = url_prefix + seg_info['l']
                    url_list = list()
                    url_dict[url] = url_list
                    info = {
                        "protocol": "http",
                        "urls": url_list,
                        "duration": seg_info['d'],
                        "length": seg_info['b'],
                        # "maxDown" : 1,
                        "unfixIp": True
                    }
                    data.append(info)
                try:
                    if use_pool:
                        async with AsyncPool(10) as pool:
                            for _ in range(10):
                                for seg_info in fs_array:
                                    url = url_prefix + seg_info['l']
                                    url_list = url_dict[url]
                                    pool.spawn(_worker(url, url_list, True))
                            await pool.join(timeout=self.parse_timeout)

                    for seg_info in fs_array:
                        url = url_prefix + seg_info['l']
                        url_list = url_dict[url]
                        if len(url_list) == 0:
                            await _worker(url, url_list, False)
                except AsyncCancelled:
                    pass
                finally:
                    return data
        return []


class IQiYiDashParser(IQiYiParser):
    stream_types = [
        {'id': '1080P-H264-DASH', 'container': 'flv', 'video_profile': '(5)1080P-H265-DASH'},
        {'id': '720P-H264-DASH', 'container': 'flv', 'video_profile': '(4)720P-H264-DASH'},
        {'id': '540P-H264-DASH', 'container': 'flv', 'video_profile': '(3)540P-H264-DASH'},
        {'id': '360P-H264-DASH', 'container': 'flv', 'video_profile': '(2)360P-H264-DASH'},
        {'id': '210P-H264-DASH', 'container': 'flv', 'video_profile': '(1)210P-H264-DASH'},
    ]

    vd_2_id = {
        100: '210P-H264-DASH',
        200: '360P-H264-DASH',
        300: '540P-H264-DASH',
        500: '720P-H264-DASH',
        600: '1080P-H264-DASH',
    }

    caption = "WWQ爱奇艺视频解析(桌面端DASH接口)"

    async def get_dash_data(self, tvid, videoid, bid=None):
        dash_data = None
        if bid is None:
            ids = self.vd_2_id.keys()
        else:
            ids = [bid]
        for bid in ids:
            _dash_data = await getdash(tvid, videoid, bid)
            logging.debug('\n%s' % _dash_data)
            assert _dash_data['code'] == 'A00000', 'can\'t play this video!!'
            if _dash_data['data']['ctl']['bid'] != bid:
                continue
            if dash_data is None:
                dash_data = _dash_data
            else:
                (await self.get_vs_array(dash_data)).extend(await self.get_vs_array(_dash_data))
        assert dash_data, 'unable to get data!!'
        return dash_data

    get_vps_data = get_dash_data

    async def get_vs_array(self, dash_data):
        return dash_data['data']['program']['video']

    async def get_url_prefix(self, dash_data):
        return dash_data['data']['dd']
